package reflection.equals.instof;

public class VehicleBO {

		protected Long id;

		public Long getId() {
			return id;
		}

		public void setId(Long id) {
			this.id = id;
		}
		
		@Override
		public boolean equals(Object obj) {
		
		if (obj == null) {
			return false;
		}

		if (this == obj) {
			return true;
		}

		if (this.getClass().isAssignableFrom(obj.getClass())) {
			VehicleBO vehicleBO = (VehicleBO) obj;
			return id.equals(vehicleBO.getId());
		}

		return false;
	}
	
}
